﻿<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <style type="text/css">
      body {
        margin-top: 0px;
        margin-right: auto;
        margin-bottom: 0px;
        margin-left: auto;
        width: 980px;
      }
      @media print {
        .Noprint {
          display: none;
        }
      }
    </style>
  </head>
  <script type=text/javascript src="/js/webprint.js"></script>
  <script type=text/javascript src="/js/mergecells.js"></script>
  <body>
    {{if or .values.ElecB .values.PhaseB}}
    <object classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" id="wb" width="0" height="0" class="Noprint">
    </object>
    <div>
      <input type=button class="Noprint" id="print" value="打印" onclick="prints();"> <input type=button class="Noprint" id="preview" value="打印预览" onclick="printpreview();">
    </div>
    </br>
    <div style="width: 650px;">
    <span style="font-size: 14px; font-family: 'Arial'; font-weight: bold; float: left;">{{.values.Version | html}}</span></br>
    <img src="/images/logo3.png" alt="logo" style="display: block; margin:auto; float: right;" /></br></br></br>
    <table id="tbl_title" border="0" cellspacing="0" cellpadding="0" style="font-size:100%">
      <thead>
        <th colspan='1' style="text-align:center; font-size: 30px; font-family: 'Arial'; font-weight: bold;" width="668">Antenna Test Report</th>
      </thead>
    </table>
    </br>
    {{end}}
    <table id="tbl_total" border="1" cellspacing="0" height="80" cellpadding="0" style="font-size: 14px; font-family: 'Arial';">
      <tbody>
        <tr>
          <td rowspan='1' style="text-align:right; font-weight: bold;" width="120">Part Number:</td>
          <td rowspan='1' style="text-align:left" width="247">&nbsp;{{.values.Item | html}}</td>
          <td rowspan='1' style="text-align:right; font-weight: bold;" width="130">Date:</td>
          <td rowspan='1' style="text-align:left" width="150">&nbsp;{{.values.Date | html}}</td>
        </tr>
        <tr>
          <td rowspan='1' style="text-align:right; font-weight: bold;" width="120">Model:</td>
          <td rowspan='1' style="text-align:left" width="247">&nbsp;{{.values.Model | html}}</td>
          <td rowspan='1' style="text-align:right; font-weight: bold;" width="130">Test Technician:</td>
          <td rowspan='1' style="text-align:left" width="150">&nbsp;{{.values.Operator | html}}</td>
        </tr>
        <tr>
          <td rowspan='1' style="text-align:right; font-weight: bold;" width="120">Serial Number:</td>
          <td rowspan='1' style="text-align:left" width="247">&nbsp;{{.values.Serial | html}}</td>
          <td rowspan='1' style="text-align:right; font-weight: bold;" width="130">Final Test Result:</td>
          {{if eq .values.Result "FAIL"}}
            <td rowspan='1' style="text-align:left; color: #EE0000; background: #EFF000;" width="190">&nbsp;{{.values.Result | html}}</td>
          {{else}}
            <td rowspan='1' style="text-align:left" width="150">&nbsp;{{.values.Result | html}}</td>
          {{end}}
        </tr>
      </tbody>
    </table>
    {{if .values.ElecB}}
    </br>
    <div class="content-box">
    <table id="tbl_ele" border="1" cellspacing="0" cellpadding="0" style="font-size: 14px; font-family: 'Arial';">
      <thead>
        <tr>
          <th colspan='6' style="text-align:left; font-size: 18px; height: 30px;">&nbsp;&nbsp;Electrical Data</th>
        </tr>
        <tr>
          <th rowspan='1' style="text-align:center" width="120" height="35">Parameter</th>
          <th rowspan='1' style="text-align:center" width="100">Frequency(MHz)</th>
          <th rowspan='1' style="text-align:center" width="120">Specification</th>
          <th rowspan='1' style="text-align:center" width="110">Port</th>
          <th rowspan='1' style="text-align:center" width="103">Test Data</th>
          <th rowspan='1' style="text-align:center" width="90">Test Result</th>
        </tr>
      </thead>
      <tbody id="group_one">
        {{range .elecs}}
        {{$curl := .}}
        <tr>
          <td style="text-align:center">{{$curl.Parameter | html}}</td>
          <td style="text-align:center">{{$curl.Frequency | html}}</td>
          <td style="text-align:center">{{$curl.Specification | html}}</td>
          <td style="text-align:center">{{$curl.Ports | html}}</td>
          <td style="text-align:center; height: 20px;">{{$curl.Data | html}}</td>
          <td style="text-align:center">{{$curl.Result | html}}</td>
        </tr>
        {{end}}
      </tbody>
    </table>
    </div>
    {{end}}
    {{if .values.PhaseB}}
    </br>
    <div class="content-box">
    <table id="tbl_pha" border="1" cellspacing="0" cellpadding="0" style="font-size: 14px; font-family: 'Arial';">
      <thead>
        <tr>
          <th colspan='5' style="text-align:left; font-size: 18px; height: 30px;">&nbsp;&nbsp;Phase Data</th>
        </tr>
        <tr>
          <th rowspan='1' style="text-align:center" width="220" height="35">Parameter</th>
          <th rowspan='1' style="text-align:center" width="120">Specification</th>
          <th rowspan='1' style="text-align:center" width="110">Port</th>
          <th rowspan='1' style="text-align:center" width="105">Test Data</th>
          <th rowspan='1' style="text-align:center" width="90">Test Result</th>
        </tr>
      </thead>
      <tbody id="group_two">
        {{range .phases}}
        {{$curl := .}}
        <tr>
          <td style="text-align:center">{{$curl.Parameter | html}}</td>
          <td style="text-align:center">{{$curl.Specification | html}}</td>
          <td style="text-align:center">{{$curl.Ports | html}}</td>
          <td style="text-align:center; height: 20px;">{{$curl.Data | html}}</td>
          <td style="text-align:center">{{$curl.Result | html}}</td>
        </tr>
        {{end}}
      </tbody>
    </table>
    </div>
    {{end}}
    </div>
  </body>
  <script type="text/javascript">
    if(typeof(tbl_ele) != "undefined" && typeof(tbl_pha) == "undefined")
    {
      window.onload = Function(autoRowSpan(tbl_ele, 3, 1));
    }
    if(typeof(tbl_ele) == "undefined" && typeof(tbl_pha) != "undefined")
    {
      window.onload = Function(autoRowSpan(tbl_pha, 2, 1));
    }
    if(typeof(tbl_ele) != "undefined" && typeof(tbl_pha) != "undefined")
    {
      window.onload = Function(autoRowSpanTables(tbl_ele, 3, 1, tbl_pha, 2, 1));
    }
  </script>
</html>